/**********************************************************************
 * SailmiPIM - modular cross-platform feature Personal Information Manager Tools.
 * Copyright(C) 2006-2014  Georg Rudoy
 *
 * Distributed under the Boost Software License, Version 1.0.
 *(See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
 **********************************************************************/

#pragma once

#include <memory>
#include <QCoreApplication>
#include <QObject>
#include <QHash>

class QMenu;
class QAction;

namespace SailmiPIM::Plugin::TabSessManager
{
	class SessionsManager;

	class SessionMenuManager : public QObject
	{
        Q_DECLARE_TR_FUNCTIONS(SailmiPIM::Plugin::TabSessManager::SessionMenuManager)

		SessionsManager * const SessMgr_;

		QMenu * const SessMgrMenu_;

		QHash<QString, std::shared_ptr<QMenu>> Session2Menu_;
	public:
		SessionMenuManager(SessionsManager*, QObject* = nullptr);

		QAction* GetSessionsAction() const;
		void AddCustomSession(const QString&);
	};
}
